Option Explicit On 
Option Strict On

Public Class frmEAcite
    Inherits System.Windows.Forms.Form
    Public Shared sCite As String = ""
    Friend WithEvents button_example As System.Windows.Forms.Button
    Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip
    Public Shared bUpdate As Boolean


#Region " Windows Form Designer generated code "

    Public Sub New(ByVal inCitation As String)
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call
        sCite = inCitation

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents txtCite As System.Windows.Forms.TextBox
    Friend WithEvents btnOK As System.Windows.Forms.Button
    Friend WithEvents btnCancel As System.Windows.Forms.Button
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container
        Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmEAcite))
        Me.Label1 = New System.Windows.Forms.Label
        Me.txtCite = New System.Windows.Forms.TextBox
        Me.btnOK = New System.Windows.Forms.Button
        Me.btnCancel = New System.Windows.Forms.Button
        Me.button_example = New System.Windows.Forms.Button
        Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
        Me.SuspendLayout()
        '
        'Label1
        '
        Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label1.Location = New System.Drawing.Point(12, 12)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(208, 23)
        Me.Label1.TabIndex = 10
        Me.Label1.Text = "Entity and Attribute Detail Citation"
        Me.ToolTip1.SetToolTip(Me.Label1, "reference to the complete description of the entity types, attributes, and attrib" & _
                "ute values for the data set. ")
        '
        'txtCite
        '
        Me.txtCite.Location = New System.Drawing.Point(15, 27)
        Me.txtCite.Multiline = True
        Me.txtCite.Name = "txtCite"
        Me.txtCite.Size = New System.Drawing.Size(360, 100)
        Me.txtCite.TabIndex = 11
        Me.ToolTip1.SetToolTip(Me.txtCite, "reference to the complete description of the entity types, attributes, and attrib" & _
                "ute values for the data set. ")
        '
        'btnOK
        '
        Me.btnOK.Enabled = False
        Me.btnOK.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.btnOK.Image = Global.MetaDoc.My.Resources.Resources.Ok_16x16
        Me.btnOK.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
        Me.btnOK.Location = New System.Drawing.Point(222, 133)
        Me.btnOK.Name = "btnOK"
        Me.btnOK.Size = New System.Drawing.Size(72, 23)
        Me.btnOK.TabIndex = 12
        Me.btnOK.Text = "OK"
        Me.btnOK.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'btnCancel
        '
        Me.btnCancel.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.btnCancel.Image = Global.MetaDoc.My.Resources.Resources.Cancel_16x16
        Me.btnCancel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
        Me.btnCancel.Location = New System.Drawing.Point(300, 133)
        Me.btnCancel.Name = "btnCancel"
        Me.btnCancel.Size = New System.Drawing.Size(75, 23)
        Me.btnCancel.TabIndex = 13
        Me.btnCancel.Text = "Cancel"
        Me.btnCancel.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'button_example
        '
        Me.button_example.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.button_example.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.button_example.Image = Global.MetaDoc.My.Resources.Resources.app_help_48x48
        Me.button_example.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
        Me.button_example.Location = New System.Drawing.Point(382, 12)
        Me.button_example.Name = "button_example"
        Me.button_example.Size = New System.Drawing.Size(110, 48)
        Me.button_example.TabIndex = 21
        Me.button_example.Text = "EXAMPLE"
        Me.button_example.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        Me.button_example.UseVisualStyleBackColor = True
        '
        'ToolTip1
        '
        Me.ToolTip1.IsBalloon = True
        Me.ToolTip1.ShowAlways = True
        Me.ToolTip1.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info
        '
        'frmEAcite
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(504, 164)
        Me.ControlBox = False
        Me.Controls.Add(Me.button_example)
        Me.Controls.Add(Me.btnCancel)
        Me.Controls.Add(Me.btnOK)
        Me.Controls.Add(Me.txtCite)
        Me.Controls.Add(Me.Label1)
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
        Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
        Me.Name = "frmEAcite"
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.Text = "Entity and Attribute Citation"
        Me.ToolTip1.SetToolTip(Me, "reference to the complete description of the entity types, attributes, and attrib" & _
                "ute values for the data set. ")
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub

#End Region

    Private Sub frmEAcite_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        txtCite.Text = sCite
    End Sub

    Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
        sCite = txtCite.Text
        bUpdate = True
        Me.Close()
    End Sub

    Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
        bUpdate = False
        Me.Close()
    End Sub

    Private Sub txtCite_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtCite.TextChanged
        If txtCite.Text.Trim() = "" Then btnOK.Enabled = False Else btnOK.Enabled = True
    End Sub

    Public Function getUpdated() As Boolean
        Return bUpdate
    End Function
    Public Function getCite() As String
        Return sCite
    End Function

    Private Sub button_example_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button_example.Click
        Dim helpForm As dialog_help = New dialog_help("EAcite")
        helpForm.ShowDialog()
    End Sub
End Class
